<template>
	<view class="h-full p-3" style="color: #9FA6B5;">
		<view style="background-color: #242424;" class="rounded-xl">
			<view class="p-3 flex justify-between items-center border-b">
				<view class="text-white">{{$t('setting.touxiang')}}</view>
				<view>
					<image src="/static/images/zichan/7.png" style="width: 30px;height: 30px;"></image>
				</view>
			</view>
			<view class="p-3 flex justify-between items-center border-b">
				<view class="text-white">{{$t('setting.nicheng')}}</view>
				<view>
					fdunpay@gmail.com
				</view>
			</view>
			<view class="p-3 flex justify-between items-center border-b">
				<view class="text-white">{{$t('setting.zhuzhanghao')}}</view>
				<view>
					fdunpay@gmail.com
				</view>
			</view>
		</view>
		<view style="background-color: #242424;" class="rounded-xl mt-4">
			<view class="p-3 flex justify-between items-center border-b">
				<view class="text-white">{{$t('setting.yuyan')}}</view>
				<view @click="action.show=true" class="flex items-center">
					{{languageList[0].find(item=>item.id==appLanguage).name}}
					<u-icon name="arrow-right" color="#9FA6B5" size="16"></u-icon>
				</view>
			</view>
		</view>
		<view style="background-color: #242424;" class="rounded-xl mt-4">
			<view class="p-3 flex justify-between items-center border-b">
				<view class="text-white">{{$t('setting.yuyan')}}</view>
				<view class="flex items-center"  @click="navigatorTo()">
					{{$t('setting.qiehuanzhaohu')}}
					<u-icon name="arrow-right" color="#9FA6B5" size="16"></u-icon>
				</view>
			</view>
			<view class="p-3 flex justify-between items-center border-b">
				<view class="text-white">{{$t('setting.yuyan')}}</view>
				<view class="flex items-center"  @click="navigatorTo()">
					{{$t('wode.tuichudenglu')}}
					<u-icon name="arrow-right" color="#9FA6B5" size="16"></u-icon>
				</view>
			</view>
		</view>
		
		<u-picker :show="action.show" :columns="languageList" keyName="name" @cancel="action.show=false"
			@confirm="selectAction" @close="action.show=false"></u-picker>
	</view>
</template>

<script>
	import {
		mapGetters,
		mapActions
	} from 'vuex'
	export default {
		computed: {
			...mapGetters(['userInfo', 'api', 'config','languageList','appLanguage']),
		},
		data() {
			return {
				form: {
					email: '', // 邮箱
				},
				action: {
					show: false,
				},
			}
		},
		onLoad(op) {
			
		},
		methods: {
			...mapActions(['changeLang']),
			//选择语言
			selectAction(e) {
				this.action.show = false
				let id = e.value[0].id
				this.$i18n.locale = id
				this.changeLang(id)
			},
			navigatorTo(){
				uni.navigateTo({
					url: '/pages/template/login/login',
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			}

		}
	}
</script>

<style lang="scss" scoped>
	
</style>